66ec8c
@@ -162,7 +162,7 @@
public class StreamConsumer extends DefaultConsumer implements Runnable {
                 eos = line == null;
                 if (!eos && isRunAllowed()) {
                     // read ahead if there is more data
-                    line2 = br.readLine();
+                    line2 = readAhead(br);
                     boolean last = line2 == null;
                     index = processLine(line, last, index);
                 }
@@ -231,6 +231,15 @@
public class StreamConsumer extends DefaultConsumer implements Runnable {
         }
     }
 
+    private String readAhead(BufferedReader br) throws IOException {
+        if (uri.equals("in")) {
+            // do not read ahead with reading from system in
+            return null;
+        } else {
+            return br.readLine();
+        }
+    }
+
     private InputStream resolveStreamFromUrl() throws IOException {
         String u = endpoint.getUrl();
         ObjectHelper.notEmpty(u, "url");
